/**
 * \file
 * \date 18.09.2013
 * \author alex
 */
#ifndef bullet_rviz_test_VISUAL_OBJECT_H_
#define bullet_rviz_test_VISUAL_OBJECT_H_

#include <stdint.h>
#include <ros/publisher.h>
#include <visualization_msgs/Marker.h>
#include <std_msgs/ColorRGBA.h>

// Bullet class forward declarations:
class btTransform;

namespace bullet_rviz_test
{

class VisualObject
{
public:
  VisualObject();
  virtual ~VisualObject();

  virtual void visualize() = 0;

protected:
  int getMarkerId();
  visualization_msgs::MarkerPtr createMarker(const btTransform & world_transform);
  void publishMarker(const visualization_msgs::MarkerPtr & marker);

  static std_msgs::ColorRGBA colorFromRgba(uint32_t rgba);

private:
  int marker_id_;
  ros::Publisher marker_publisher_;

  static int next_marker_id_;
};

}

#endif /* bullet_rviz_test_VISUAL_OBJECT_H_ */
